<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/taglibs.jsp"%>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<c:set var="contextPath" value="<%=request.getContextPath()%>"></c:set>
 <c:forEach var="comment" varStatus="vs" items="${discussComments}">
 
 <c:choose>
 	<c:when test="${vs.count%2 == 0 }">
 		<c:set value="background-color:#ffffff;" var="bgc"></c:set>
 	</c:when>
 	<c:otherwise>
 		<c:set value="background-color:#f5f5f5;" var="bgc"></c:set>
 	</c:otherwise>
 </c:choose>
 <div style="clear: both;"></div>
               <div class="discuss_entry" style="${bgc}">
               		 
               		 <div class="num_bubble">
						    <div class="num_bubble-inner"> 
								<span>${comment.subCommNum}</span>
							</div>
							<div class="num_bubble_arrow"></div>
					</div>
					<div class="discuss_main">
						<div class="discuss_title">
							<span><a href="${contextPath}/viewDiscussDetails?comment.id=${comment.id}">${comment.title}</a></span>
						</div>
						
		                    <div class="discuss_brief">
		                    ${comment.brief}
		                    </div>
		                   
		                 <c:if test="${not empty comment.album.photos}">
            	 	       <div class="ppy1" >
								<ul class="ppy-imglist">
									<c:forEach items="${comment.album.photos}" var="photo">
										<li>
							                  <a href="${contextPath}${photo.thumbnailLarge}">
							                      <img src="${contextPath}${photo.thumbnailSmall}" alt="">
							                  </a>
							                  <c:if test="${not empty photo.description}">
							                  	<span class="ppy-extcaption">
							                      <strong>${photo.description}</strong>
							                  	</span>
							                  </c:if>
							                  
							              </li>
									</c:forEach>
							              
							      </ul>
							        <div class="ppy-outer">
							                <div style="background-image: url(&quot;${contextPath}${article.album.coverPhoto.thumbnailSmall}&quot;);" class="ppy-stage">
							                    <div class="ppy-counter">
							                        <strong class="ppy-current">1</strong> / <strong class="ppy-total">9</strong> 
							                    </div>
							               	</div>
							                <div class="ppy-nav">
							                        <a class="ppy-next" title="下一张">下一张</a>
							                        <a class="ppy-prev" title="上一张">上一张</a>
							                </div>
							       </div>
							       <div style="visibility: hidden; height: 0px; overflow: hidden;" class="ppy-caption">
							                <span class="ppy-text">
							                       
							                </span>
							       </div>
							</div>
            			 </c:if> 
		              </div>     
					<div class="discuss_user">
								<div class="discuss_user_icon">
          						 <a href="#" onclick="return false;" target="_blank"><img src="${contextPath}${comment.createByUser.headPhoto.thumbnailMiniS}" alt="" title=""></a>
          						</div>
		             		<a href="${contextPath }/viewCustomerInfo?customer.id=${comment.createByUser.id}" title="${comment.createByUser.userName}" target="_blank">${comment.createByUser.userName}</a>
		             		<div>
		             			<jsp:include page="../common/timeFormat.jsp">
								<jsp:param value="${comment.createTime.time}" name="time"/>
								<jsp:param value="${comment.createTime.year }" name="year"/>
								<jsp:param value="${comment.createTime.month }" name="month"/>
								<jsp:param value="${comment.createTime.day}" name="day"/>
								<jsp:param value="${comment.createTime.hours}" name="hours"/>
								<jsp:param value="${comment.createTime.minutes}" name="minutes"/>
								<jsp:param value="${comment.createTime.date}" name="date"/>
							</jsp:include>
		             	</div>
		             		
					</div>
					<div class="discuss_tail">
						<a href="${contextPath }/viewCustomerInfo?customer.id=${comment.latestComment.createByUser.id}" target="_blank">${comment.latestComment.createByUser.userName}</a>
						<div>
						<jsp:include page="../common/timeFormat.jsp">
							<jsp:param value="${comment.updateTime.time}" name="time"/>
							<jsp:param value="${comment.updateTime.year }" name="year"/>
							<jsp:param value="${comment.updateTime.month }" name="month"/>
							<jsp:param value="${comment.updateTime.day}" name="day"/>
							<jsp:param value="${comment.updateTime.hours}" name="hours"/>
							<jsp:param value="${comment.updateTime.minutes}" name="minutes"/>
							<jsp:param value="${comment.updateTime.date}" name="date"/>
						</jsp:include>
						</div>
						
					</div>
	           </div>

</c:forEach>